<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>canvas画布</title>
</head>

<body>
    <canvas id="canvas" width="600" height="400" style="border: 1px solid #000;"></canvas>
</body>
<script>
    var canvas = document.getElementById("canvas");
    var ctx = canvas.getContext("2d");

    // 设置圆心坐标和半径
    var centerX = canvas.width / 2;
    var centerY = canvas.height / 2;
    var radius = 100;

    // 画圆
    ctx.beginPath();
    ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI);
    ctx.fillStyle = "pink";
    ctx.fill();
    var img = new Image();
    img.onload = function () {
        ctx.drawImage(img, centerX - radius / 2, centerY - radius / 2, radius, radius);
    };
    img.src = "./202032417132084226.jpg"; // your_image_source是图片的源地址
</script>
</script>

</html>